package com.blog.config;

import com.blog.interceptor.DataInterceptor;
import com.blog.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 任浩
 * @version 1.0
 */

//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Autowired
//    private LoginInterceptor loginInterceptor;
//    @Autowired
//    private DataInterceptor dataInterceptor;
//
//    /**
//     * 配置拦截器
//     * @param registry
//     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor)
//                .excludePathPatterns("/**/*.png","/**/*.css","/**/*.jpg");
//        registry.addInterceptor(dataInterceptor)
//                .excludePathPatterns("/**/*.png","/**/*.css","/**/*.jpg");
//    }
//
//}
